package cn.alpha.intell.rbtlib.model;

/**
 * Created by zhangxiliang on 2016/11/10.
 */
public enum  RelationEnum {
    RBT("Robot\\Models\\Robot"),
    MOB("Robot\\Models\\User");


    private String value;

    // 构造方法
    RelationEnum(String value) {
        this.value = value;
    }


    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return this.getValue();
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static RelationEnum fromString(String text) {
        if (text != null) {
            for (RelationEnum command : RelationEnum.values()) {
                if (text.equalsIgnoreCase(command.getValue())) {
                    return command;
                }
            }
        }
        return null;
    }
}
